package com.woniu.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVO {
    private Integer code;
    private String message;
    private Object data;

    public static ResultVO success(String message,Object data){
        return new ResultVO(CodeNum.SUCCESS_CODE,message,data);
    }
    public static ResultVO success(String message){
        return new ResultVO(CodeNum.SUCCESS_CODE,message,null);
    }
    public static ResultVO error(String message){
        return new ResultVO(CodeNum.ERROR_CODE,message,null);
    }
}
